﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ViewCart.aspx.cs" Inherits="ViewCart" Title="Giỏ hàng" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   <div class="art-post">
                              <div class="art-post-body">
                          <div class="art-post-inner art-article">
                                          <div class="art-postmetadataheader">
                                              <h2 class="art-postheader">Giỏ hàng của bạn</h2>
                                          </div>
                                           <div class="art-postcontent">
                                           <br />
                                                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="2"
        EmptyDataText="Giỏ hàng trống" ForeColor="Black" OnRowDeleting="GridView1_RowDeleting" CssClass="table_gio_hang"
        Width="100%" ShowFooter="True" BackColor="LightGoldenrodYellow" 
        BorderColor="Tan" BorderWidth="1px" GridLines="None" 
        onselectedindexchanged="GridView1_SelectedIndexChanged2">
        <FooterStyle BackColor="PaleGoldenrod"/>
        <EmptyDataRowStyle Font-Bold="True" Font-Size="18pt" ForeColor="Red" HorizontalAlign="Center" BackColor="Yellow" Height="50px" CssClass="footer" />
        <Columns>
            <asp:BoundField DataField="MaTL" HeaderText="Mã" />
            <asp:TemplateField HeaderText="Tên tài liệu">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("TenTL") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:HyperLink CssClass="ten" ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("MaTL", "ProductDetail.aspx?ProductID={0}") %>'
                        Text='<%# Eval("TenTL") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Gia" DataFormatString="{0}" HeaderText="Giá (VNĐ)" />
            <asp:TemplateField HeaderText="Số lượng" FooterText="Tổng cộng (VNĐ): ">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                   <div class="so_luong"> <asp:TextBox ID="txtQuantity" runat="server" Text='<%# Eval("SoLuong") %>' Width="36px" CssClass="so_luong"></asp:TextBox></div>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtQuantity"
                        ErrorMessage="CompareValidator" Operator="GreaterThan" Type="Integer" ValueToCompare="0"></asp:CompareValidator>
                </ItemTemplate>
                <FooterStyle Font-Bold="True" HorizontalAlign="Right" CssClass="footer"/>
            </asp:TemplateField>
            <asp:BoundField DataField="SoTien" DataFormatString="{0} " HeaderText="Thành tiền (VNĐ)" 
                FooterText=" VNĐ" >
                <FooterStyle Font-Bold="True" ForeColor="Red" />
            </asp:BoundField>
            <asp:CommandField ShowDeleteButton="True" DeleteText="Xóa" ButtonType="Image" DeleteImageUrl="~/images/bt_remove.ico" ControlStyle-Width="20px" />
        </Columns>
        <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
            HorizontalAlign="Center" />
        <HeaderStyle BackColor="PaleGoldenrod" Font-Bold="True" />
        <AlternatingRowStyle BackColor="White" />

    </asp:GridView>
    &nbsp; &nbsp;
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td align="center" style="border: 0px !important; text-align: center !important;">
    <asp:Button ID="btnUpdate" runat="server" OnClick="btnUpdate_Click" Text="Cập nhật" Width="80px" CssClass="art-button"/>&nbsp;
    <asp:Button ID="btnClear" runat="server" OnClick="btnClear_Click" Text="Xóa hết" Width="80px" CssClass="art-button" />
    <asp:Button ID="btnCheckout" runat="server" OnClick="btnCheckout_Click" Text="Thanh toán" Width="80px" CssClass="art-button"/></td>
        </tr>
    </table>
                                           
                                          </div>
                                          
                                          <div class="cleared"></div>
                          </div>
                          
                          		<div class="cleared"></div>
                              </div>
                          </div>

</asp:Content>

